<template>
  <div >
    <!-- 下拉刷新 -->
    <van-pull-refresh v-model="isLoading" @refresh="onRefresh">
          <div>
        <h3 style="margin:0">{{playvideo.details}}</h3>
    <div style="color:#666" >
      <span style="font-size:12px">{{playvideo.origin}}</span>
      <span style="padding-left:50px;font-size:12px">{{moment(playvideo.time).format('YYYY-MM-DD')}}</span>
    </div>
    <video :src="/pic&video/+playvideo.video" controls style="width:100%;height:150px" :poster="/pic&video/+playvideo.pic"></video>
    </div>
    </van-pull-refresh>
  
   
  </div>
</template>

<script>
import { Toast } from 'vant';
  export default {
    data() {
      return {
        // 存放视频
        playvideo: [],
      
         isLoading: false,

      }
    },
    methods: {
      PlayVideo() {
        let id=this.$route.query.id
        let url='/playvideo?id='+id
        this.axios.get(url).then(res=>{
          this.playvideo=res.data.results[0]
          console.log('111',res);
        })
      },
        // 下拉刷新
       onRefresh() {
      setTimeout(() => {
       Toast('刷新成功');
        this.isLoading = false;
      }, 2000);
    },
  },
    mounted () {
      this.PlayVideo()
    },
  }
</script>

<style  scoped>
 div{
   display: block;
   padding: 5px;
 }

</style>